<template>
  <div>bro2</div>
</template>

<script setup lang="ts">
import { provide, inject } from "vue";
import { EventBusType, EventBusKey } from "../../utils/EventBus";

const EventBus = inject<EventBusType>(EventBusKey);

EventBus?.on("bro1", (data: string) => {
  console.log("bro2收到bro1的消息", data);
});
</script>

<style scoped></style>
